import request from '@/utils/request'

// 获取会员管理列表
export const getMemberList = (data) => {
  return request({
    url: '/member/list',
    method: 'get',
    params:data
  })
}

// 保存会员管理
export const addMember = (data) => {
  return request({
    url: '/member/edit',
    method: 'post',
    data: data
  })
}

// 删除会员管理
export const deleteMember = (id) => {
  return request({
    url: '/member/'+id,
    method: 'delete'
  })
}

// 修改会员管理
export const editMember = (data) => {
  return request({
    url: '/member/edit',
    method: 'put',
    data: data
  })
}

// 获取会员管理详情
export const getMemberDetail = (id) => {
  return request({
    url: '/member/'+id,
    method: 'get'
  })
}


// 充值金额
export const recharge = (data) => {
  return request({
    url: '/member/recharge',
    method: 'put',
    data: data
  })
}

// 修改邀请人
export const changePerson = (data) => {
  return request({
    url: '/member/editInviter',
    method: 'put',
    data: data
  })
}

// 拨款
export const memberTransfer = (data) => {
  return request({
    url: '/member/transfer',
    method: 'put',
    data: data
  })
}
